#include<stdio.h>
#include<stdlib.h>
#include<math.h>

void plot(int step, double val, char style)
{
    int ival = (int)(val * 100 + 0.5) + 100;
    printf("%d: %lf.2", step, val);
    for(int i=0;i<ival;i++)
    {
        printf(" ");
    }
    printf("%c", style);
    for(int i=ival+1;i<201;i++)
    {
        printf(" ");
    }
    printf("\n");
}

int main()
{
    int step = 0;
    do
    {
        printf("Input the number of steps:");
        scanf("%d", &step);
    }
    while(step <= 0);

    double angle, k, val;
    double max_angle = 2 * M_PI;
    char style;

    for(int i=0;i<=step;i++)
    {
        angle = (double)i * max_angle / (double)step;
        k = cos(angle);
        val = sin(angle);
        if(fabs(k)<0.1)
        {
            style = '*';
        }
        else if(k>0)
        {
            style = '\\';
        }
        else
        {
            style = '/';
        }
        plot(step, val, style);
    }
    return 0;
}        
        
        
